﻿@{
    Layout = "~/Views/Shared/_Index.cshtml";
}

<div class="container-div">
    <div class="row">
        
        <div class="col-sm-12 select-table table-striped">
            <table id="gridTable" data-mobile-responsive="true"></table>
        </div>
    </div>
</div>

<script type="text/javascript">
    var id = ys.request("id");
    $(function () {

        initGrid();
    });
    function initGrid() {
        var queryUrl = '@Url.Content("~/YiDongYuan/DetectionTask/DetectionProcessData")' + '?id=' + id;
        $('#gridTable').ysTable({
            url: queryUrl,
            columns: [
                { field: 'Time', title: '时间' },
                {
                    field: 'Index', title: '次序', formatter: function (value, row, index) {
                        var index = "";
                        if (value == 1) {
                            index = "第一次吹拂";
                        } else if (value == 2) {
                            index = "第二次吹拂";
                        } else if (value == 3) {
                            index = "第三次吹拂";
                        } else if (value == 4) {
                            index = "第一次检测";
                        } else if (value == 5) {
                            index = "第二次检测";
                        } else if (value == 6) {
                            index = "第三次检测";
                        } else {
                            index = "检测无效";
                        }
                        return index;
                    }
                },
                { field: 'Speed', title: '转速' },
                { field: 'NValue', title: 'n值' },
                { field: 'KValue', title: 'k值' },

            ],
            pagination: false,
        });
    }



</script>
